<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
    <title>View Package</title>
</h:head>

<h:body onload="#{PackageManaged.searchById()}">
	<h:form>
	<p:menubar>  
        <p:submenu label="Package Section" >  
            <p:menuitem value="Create Package" url="packageInsertion.xhtml" />  
            <p:menuitem value="All Packages" url="package.xhtml" />  
        </p:submenu>  
  
        <p:submenu label="Hotel Section" >  
            <p:menuitem value="Add Hotel" url="hotelInsert.xhtml" />  
            <p:menuitem value="All Hotel" url="hotel.xhtml" />  
        </p:submenu>  
        
         <p:submenu label="Transportation Section" >  
            <p:menuitem value="Add Transportation" url="transportationInsert.xhtml" />  
            <p:menuitem value="All Transportation" url="transportationMean.xhtml" />  
        </p:submenu>  
        
         <p:submenu label="Excursion Section" >  
            <p:menuitem value="Add Excursion" url="excursionInsert.xhtml" />  
            <p:menuitem value="All Excursion" url="excursion.xhtml" />  
        </p:submenu>  
  
       <f:facet name="options">   
       		<p:commandButton value="Check OutDated Package" action="#{CheckInvalid.checkAll()}"/>
            <p:commandButton value="Logout" action="#{LoginManaged.logout()}"/>
       </f:facet>
    </p:menubar>  
		<p:panelGrid columns="2">
			<f:facet name="header">Package</f:facet>
			<p:outputLabel value = "ID:"/>
			<h:outputText value="#{PackageManaged.viewedP.id}"/>
			<p:outputLabel value = "Name:"/>
			<h:outputText value="#{PackageManaged.viewedP.name}"/>
			<p:outputLabel value = "Description:"/>
			<h:outputText value="#{PackageManaged.viewedP.description}"/>
			<p:outputLabel value = "Nation:"/>
			<h:outputText value="#{PackageManaged.viewedP.nation}"/>
			<p:outputLabel value = "Price:"/>
			<h:outputText value="#{PackageManaged.viewedP.price}"/>
			<p:outputLabel value = "Hotel:"/>
			<p:commandButton id="hotel" value="Details" onclick="PF('dlgh').show();" />
			<p:outputLabel value = "Going :"/>
			<p:commandButton id="goi" value="Details" onclick="PF('dlgg').show();" />
			<p:outputLabel value = "Return:"/>
			<p:commandButton id="ret" value="Details" onclick="PF('dlgr').show();" />
			<p:outputLabel value = "Excursion:"/>
			<p:commandButton id="excursion" value="Details" onclick="PF('dlge').show();" />
		</p:panelGrid>

    </h:form>
    
    <p:dialog header="Effects" widgetVar="dlgh" showEffect="explode" hideEffect="explode">  
    	<p:panelGrid columns="2">
    		<p:outputLabel value = "ID:"/>
			<h:outputText value="#{PackageManaged.hDTO.id}"/>
			<p:outputLabel value = "Name:"/>
			<h:outputText value="#{PackageManaged.hDTO.name}"/>
			<p:outputLabel value = "Available Place:"/>
			<h:outputText value="#{PackageManaged.hDTO.availablePlaces}"/>
			<p:outputLabel value = "Description:"/>
			<h:outputText value="#{PackageManaged.hDTO.description}"/>
			<p:outputLabel value = "Website:"/>
			<h:outputText value="#{PackageManaged.hDTO.website}"/>
			<p:outputLabel value = "EMail:"/>
			<h:outputText value="#{PackageManaged.hDTO.email}"/>
			<p:outputLabel value = "City:"/>
			<h:outputText value="#{PackageManaged.hDTO.city}"/>
			<p:outputLabel value = "Stars:"/>
			<h:outputText value="#{PackageManaged.hDTO.stars}"/>
			<p:outputLabel value = "Address:"/>
			<h:outputText value="#{PackageManaged.hDTO.address}"/>
			<p:outputLabel value = "Phone:"/>
			<h:outputText value="#{PackageManaged.hDTO.phone}"/>
			<p:outputLabel value = "Price:"/>
			<h:outputText value="#{PackageManaged.hDTO.price}"/> 
			</p:panelGrid>
	</p:dialog>  
	
	<p:dialog header="Effects" widgetVar="dlgg" showEffect="explode" hideEffect="explode">  
    	<p:panelGrid columns="2">
			<h:outputLabel>Name</h:outputLabel>
					<h:outputText value="#{PackageManaged.gDTO.name}" />
					<h:outputLabel>Available Places</h:outputLabel>
					<h:outputText value="#{PackageManaged.gDTO.availablePlaces}" />
					<h:outputLabel>Type</h:outputLabel>
					<h:outputText value="#{PackageManaged.gDTO.type}" />
					<h:outputLabel>Arrival Time</h:outputLabel>
					<h:outputText value="#{PackageManaged.gDTO.arrivalTime}">
		    			<f:convertDateTime type="time" timeStyle="short" timeZone="Europe/Paris"/>
		    		</h:outputText>
					<h:outputLabel>Departure Time</h:outputLabel>
					<h:outputText value="#{PackageManaged.gDTO.departureTime}">
		    			<f:convertDateTime type="time" timeStyle="short" timeZone="Europe/Paris"/>
		    		</h:outputText>
					<h:outputLabel>Arrival Date</h:outputLabel>
					<h:outputText value="#{PackageManaged.gDTO.arrivalDate}">
		  				<f:convertDateTime type="date" pattern="dd-MM-yyyy" timeZone="Europe/Paris"/>
					</h:outputText>
					<h:outputLabel>Departure Date</h:outputLabel>
					<h:outputText value="#{PackageManaged.gDTO.departureDate}">
		  				<f:convertDateTime type="date" pattern="dd-MM-yyyy" timeZone="Europe/Paris"/>
					</h:outputText>
					<h:outputLabel>Arrival Place</h:outputLabel>
					<h:outputText value="#{PackageManaged.gDTO.arrivalPlace}" />
					<h:outputLabel>Departure Place</h:outputLabel>
					<h:outputText value="#{PackageManaged.gDTO.departurePlace}" />
					<h:outputLabel>Company</h:outputLabel>
					<h:outputText value="#{PackageManaged.gDTO.company}" />
					<h:outputLabel>Price</h:outputLabel>
					<h:outputText value="#{PackageManaged.gDTO.price}" />
		</p:panelGrid>
	</p:dialog>  
	
	<p:dialog header="Effects" widgetVar="dlgr" showEffect="explode" hideEffect="explode">  
    	<p:panelGrid columns="2">
    		<h:outputLabel>Name</h:outputLabel>
					<h:outputText value="#{PackageManaged.rDTO.name}" />
					<h:outputLabel>Available Places</h:outputLabel>
					<h:outputText value="#{PackageManaged.rDTO.availablePlaces}" />
					<h:outputLabel>Type</h:outputLabel>
					<h:outputText value="#{PackageManaged.rDTO.type}" />
					<h:outputLabel>Arrival Time</h:outputLabel>
					<h:outputText value="#{PackageManaged.rDTO.arrivalTime}">
		    			<f:convertDateTime type="time" timeStyle="short" timeZone="Europe/Paris"/>
		    		</h:outputText>
					<h:outputLabel>Departure Time</h:outputLabel>
					<h:outputText value="#{PackageManaged.rDTO.departureTime}">
		    			<f:convertDateTime type="time" timeStyle="short" timeZone="Europe/Paris"/>
		    		</h:outputText>
					<h:outputLabel>Arrival Date</h:outputLabel>
					<h:outputText value="#{PackageManaged.rDTO.arrivalDate}">
		  				<f:convertDateTime type="date" pattern="dd-MM-yyyy" timeZone="Europe/Paris"/>
					</h:outputText>
					<h:outputLabel>Departure Date</h:outputLabel>
					<h:outputText value="#{PackageManaged.rDTO.departureDate}">
		  				<f:convertDateTime type="date" pattern="dd-MM-yyyy" timeZone="Europe/Paris"/>
					</h:outputText>
					<h:outputLabel>Arrival Place</h:outputLabel>
					<h:outputText value="#{PackageManaged.rDTO.arrivalPlace}" />
					<h:outputLabel>Departure Place</h:outputLabel>
					<h:outputText value="#{PackageManaged.rDTO.departurePlace}" />
					<h:outputLabel>Company</h:outputLabel>
					<h:outputText value="#{PackageManaged.rDTO.company}" />
					<h:outputLabel>Price</h:outputLabel>
					<h:outputText value="#{PackageManaged.rDTO.price}" />
		</p:panelGrid>
	</p:dialog>  
	
	<p:dialog header="Effects" widgetVar="dlge" showEffect="explode" hideEffect="explode">  
    	<p:panelGrid columns="2">
			<p:outputLabel value = "ID:"/>
			<h:outputText value="#{PackageManaged.eDTO.id}"/>
			<p:outputLabel value = "Name:"/>
			<h:outputText value="#{PackageManaged.eDTO.name}"/>
			<p:outputLabel value = "Date:"/>
			<h:outputText value="#{PackageManaged.eDTO.date}">
		  				<f:convertDateTime type="date" pattern="dd-MM-yyyy" timeZone="Europe/Paris"/>
			</h:outputText>
			<p:outputLabel value = "Available Place:"/>
			<h:outputText value="#{PackageManaged.eDTO.availablePlaces}"/>
			<p:outputLabel value = "Description:"/>
			<h:outputText value="#{PackageManaged.eDTO.description}"/>
			<p:outputLabel value = "Duration:"/>
			<h:outputText value="#{PackageManaged.eDTO.duration}"/>
			<p:outputLabel value = "Type:"/>
			<h:outputText value="#{PackageManaged.eDTO.type}"/>
			<p:outputLabel value = "City:"/>
			<h:outputText value="#{PackageManaged.eDTO.city}"/>
			<p:outputLabel value = "Price:"/>
			<h:outputText value="#{PackageManaged.eDTO.price}"/>
		</p:panelGrid>
	</p:dialog>  
<p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />	
</h:body>

</html>
